﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OpenHelloGuokr.BasicObjects
{
    public sealed class Avatar
    {
        internal string _AvatarName = string.Empty;
        public bool IsValid
        {
            get
            {
                return string.IsNullOrEmpty(_AvatarName);
            }
        }
        public bool Set(string avatarName)
        {
            _AvatarName = RegexLib.AvatarName.IsMatch(avatarName) ? avatarName : string.Empty;
            return IsValid;
        }

        ///// <summary>
        ///// 160x160
        ///// </summary>
        //public string Large
        //{
        //    get
        //    {
        //        return IsValid ? string.Concat(_AvatarName, @"_160x160") : string.Empty;
        //    }
        //}

        /// <summary>
        /// 160x160
        /// </summary>
        public string Regular
        {
            get
            {
                return IsValid ? string.Concat(_AvatarName, @"_160x160") : string.Empty;
            }
        }

        /// <summary>
        /// 48x48
        /// </summary>
        public string Medium
        {
            get
            {
                return IsValid ? string.Concat(_AvatarName, @"_48x48") : string.Empty;
            }
        }

        /// <summary>
        /// 24x24
        /// </summary>
        public string Small
        {
            get
            {
                return IsValid ? string.Concat(_AvatarName, @"_24x24") : string.Empty;
            }
        }

        ///// <summary>
        ///// 24x24
        ///// </summary>
        //public string Tiny
        //{
        //    get
        //    {
        //        return IsValid ? string.Concat(_AvatarName, @"_24x24") : string.Empty;
        //    }
        //}
    }
}
